﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Text
{
    class Program
    {
        static void Main(string[] args)
        {
            //数组
            int[] age = { 17,18,19,20,21};
            Console.WriteLine(age[1]);//18

            Console.WriteLine("\n");

            for (int i = 0; i < age.Length; i++)
            {
                Console.WriteLine(age[i]);//17 18 19 20 21
            }

            Console.WriteLine("\n");

            int[] num = new int[5];//实例化一个数组 存5个数 因为没有定义 所以5个数都是0
            for (int i = 0; i < num.Length; i++)
            {
                Console.WriteLine(num[i]);//0 0 0 0 0
            }

            Console.WriteLine("\n");

            int[,] nums = new int[3, 6]//逗号前面代表行 逗号后面代表列 也就是一共有3行 每行里面有6个数字
            {
                { 10,20,30,40,50,60},
                { 11,22,33,44,55,66},
                { 23,43,78,98,46,100}
            };
            Console.WriteLine(nums[1,2]);//33
            Console.ReadKey();

            Work.PrintInfo();
        }
    }
}
